package com.pictures.mapper;

import com.pictures.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface UserMapper {

    //查询所有用户
    List<User> getUsers();

    //根据id查询用户
    User getUserById(@Param("id") Long id);

    //添加一个用户
    void addUser(User user);

    //根据删除用户
    int deleteUserById(@Param("id") Long id);

    //更新用户
    int updateUser(User user);

    //根据用户名密码查询用户
    User getUserByUsernameAndPassword(Map<String,Object> map);
}

